home *** CD-ROM | disk | FTP | other *** search
/ Games of Daze / Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso / x2ftp / msdos / libs / knowhow4 / khquerry.h < prev    next >
C/C++ Source or Header  |  1994-10-10  |  1KB  |  36 lines

  1. #ifndef __KH_QUERRY_H_
  2. #define __KH_QUERRY_H_
  3.  
  4. #include "strtable.h"
  5.  
  6. /*  CHECKERS are markers, which tells to AskManager, how to work with
  7.     data. For example, CHECK marked field exclude duplicated records,
  8.     CHECKPLUS includes them. In ver. 1.0 only ZERO - NOT ZERO difference
  9.     is significant.
  10. */
  11. enum KH_CHECKERS { QFREE = 0, QCHECK = 1, QCHECKPLUS = 2, QGROUP = 4,
  12.            QCALC = 8 };
  13.  
  14.  
  15. struct KH_QUERRY
  16.     {
  17.     KH_STRTABLE* querry;                   // Text of querries
  18.     int* querryNumbers;                    // Numbers of fields to querry
  19.     KH_STRTABLE* examples;                 // List of EXAMPLES in querry
  20.     int* exampleNumbers;                   // Numbers of examples fields
  21.     int* checkedFields;                    // Fields to show in "ANSWER"
  22.  
  23. /*
  24.     QUERRY constructor gets the full list of querry strings ("" for field
  25.     with no condition), and integer containing the number of columns
  26.     in the table. The output is the list of non-empty conditions with
  27.     corresponding column numbers, list of EXAMPLES and list of checkers.
  28. */
  29.     KH_QUERRY(char** q, char** e, char* c, int numOfColumns);
  30.     KH_QUERRY(KH_STRTABLE* q, KH_STRTABLE* e, char* c, int numOfColumns)
  31.     { KH_QUERRY(q->strings, e->strings, c, numOfColumns); }
  32.  
  33.     ~KH_QUERRY();
  34.     };
  35.  
  36. #endif __KH_QUERRY_H_